package com.xiaoze.stream.controller;

import com.xiaoze.stream.service.Sender;
import com.xiaoze.stream.service.impl.SenderImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ProviderController {

    @Autowired
    private Sender sender;

    @GetMapping("/")
    public String toSender(){

        sender.sayHello();
        return "发了";
    }

    @GetMapping("/hello")
    public String toSenderSecond(){

        sender.sayHelloAndResponse();
        return "sayHelloAndResponse发了";
    }

}
